import http from '@/utils/http';

export const foldersApi = {
  getList: (params: Record<string, any>) => {
    return http.get('/folder/tree', { params });
  },

  getDetail: (id: number | string) => {
    return http.get(`/folder/${id}`);
  },

  create: (data: Record<string, any>) => {
    return http.post('/folder', data);
  },

  update: (id: number | string, data: Record<string, any>) => {
    return http.put(`/folder/${id}`, data);
  },

  remove: (id: number | string) => {
    return http.delete(`/folder/${id}`);
  },
}




